Optimal. Leaf size=94 \[ -\frac {3 a \cos (c+d x)}{2 d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}+\frac {3 a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {3 b \cot (c+d x)}{2 d}+\frac {b \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {3 b x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {2838, 2592, 288, 321, 206, 2591, 203} \[ -\frac {3 a \cos (c+d x)}{2 d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}+\frac {3 a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {3 b \cot (c+d x)}{2 d}+\frac {b \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {3 b x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 206
Rule 288
Rule 321
Rule 2591
Rule 2592
Rule 2838
Rubi steps
\begin {align*} \int \cos (c+d x) \cot ^3(c+d x) (a+b \sin (c+d x)) \, dx &=a \int \cos (c+d x) \cot ^3(c+d x) \, dx+b \int \cos ^2(c+d x) \cot ^2(c+d x) \, dx\\ &=-\frac {a \operatorname {Subst}\left (\int \frac {x^4}{\left (1-x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d}-\frac {b \operatorname {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {b \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}+\frac {(3 a) \operatorname {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 d}-\frac {(3 b) \operatorname {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=-\frac {3 a \cos (c+d x)}{2 d}-\frac {3 b \cot (c+d x)}{2 d}+\frac {b \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}+\frac {(3 a) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 d}+\frac {(3 b) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=-\frac {3 b x}{2}+\frac {3 a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {3 a \cos (c+d x)}{2 d}-\frac {3 b \cot (c+d x)}{2 d}+\frac {b \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.48, size = 132, normalized size = 1.40 \[ -\frac {a \cos (c+d x)}{d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {3 b (c+d x)}{2 d}-\frac {b \sin (2 (c+d x))}{4 d}-\frac {b \cot (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.73, size = 139, normalized size = 1.48 \[ -\frac {6 \, b d x \cos \left (d x + c\right )^{2} + 4 \, a \cos \left (d x + c\right )^{3} - 6 \, b d x - 6 \, a \cos \left (d x + c\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (b \cos \left (d x + c\right )^{3} - 3 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 163, normalized size = 1.73 \[ \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, {\left (d x + c\right )} b - 12 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 4 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 4 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 5 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 16 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.46, size = 143, normalized size = 1.52 \[ -\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{2}}-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{2 d}-\frac {3 a \cos \left (d x +c \right )}{2 d}-\frac {3 a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d}-\frac {b \left (\cos ^{5}\left (d x +c \right )\right )}{d \sin \left (d x +c \right )}-\frac {b \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{d}-\frac {3 b \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}-\frac {3 b x}{2}-\frac {3 b c}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 101, normalized size = 1.07 \[ -\frac {2 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} b - a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - 4 \, \cos \left (d x + c\right ) + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.37, size = 236, normalized size = 2.51 \[ \frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {17\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+8\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+9\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {3\,b\,\mathrm {atan}\left (\frac {9\,b^2}{9\,a\,b-9\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {9\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{9\,a\,b-9\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________